﻿<UserControl x:Class="XCodeGenerator.MetaInfoView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid>
       <Grid.ColumnDefinitions>
           <ColumnDefinition Width="85"/>
           <ColumnDefinition Width="150"/>
           <ColumnDefinition Width="10"/>
           <ColumnDefinition Width="85"/>
           <ColumnDefinition Width="150"/>
        </Grid.ColumnDefinitions> 
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="100"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>

        <Label Content="Name:" ToolTip="Name of the generated File." Height="26" Grid.Column="0" Grid.Row="0"/>
        <TextBox Text="{Binding Name}" ToolTip="Name of the generated File." Height="26" Grid.Column="1" Grid.Row="0"/>
        <Label Content="NameSpace:" ToolTip="NameSpace of the generated File." Height="26" Grid.Column="3" Grid.Row="0"/>
        <TextBox Text="{Binding NameSpace}" ToolTip="NameSpace of the generated File."  Height="26" Grid.Column="4" Grid.Row="0"/>

        <Label Content="Directory:" Height="26" ToolTip="Output Directory of the generated File." Grid.Column="0"  Grid.Row="1"/>
        <TextBox Text="{Binding Directory}" ToolTip="Output Directory of the generated File." Height="26" Grid.Column="1" Grid.Row="1"/>
        <Label Content="Base:" Height="26" ToolTip="Base Class/Interface of the generated File." Grid.Column="3"  Grid.Row="1"/>
        <TextBox Text="{Binding BaseItem}" ToolTip="Base Class/Interface of the generated File." Height="26" Grid.Column="4" Grid.Row="1"/>

        <Label Content="Usings:" Height="26" VerticalAlignment="Top" Grid.Column="0" Grid.Row="2"/>
        <ListView ItemsSource="{Binding Usings}" SelectedItem="{Binding SelectedUsing}" Grid.Column="1" Grid.Row="2"/>
        <DockPanel Width="60" Grid.Column="1" Grid.Row="3">
            <Button Content="+" Command="{Binding DataContext.AddUsingCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" CommandParameter="{Binding Context, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Height="26" Width="26" DockPanel.Dock="Left"/>
            <Button Content="-" Command="{Binding DataContext.RemoveUsingCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" CommandParameter="{Binding Context, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Height="26" Width="26" DockPanel.Dock="Left"/>
        </DockPanel>
        
        <Label Content="Interfaces:" Height="26" VerticalAlignment="Top" Grid.Column="3" Grid.Row="2"/>
        <ListView ItemsSource="{Binding Interfaces}" SelectedItem="{Binding SelectedInterface}" Grid.Column="4" Grid.Row="2"/>
        <DockPanel Width="60" Grid.Column="4" Grid.Row="3">
            <Button Content="+" Command="{Binding DataContext.AddInterfaceCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" CommandParameter="{Binding Context, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Height="26" Width="26" DockPanel.Dock="Left"/>
            <Button Content="-" Command="{Binding DataContext.RemoveInterfaceCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" CommandParameter="{Binding Context, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Height="26" Width="26" DockPanel.Dock="Left"/>
        </DockPanel>
        
    </Grid>
</UserControl>
